package com.byxy.student.service;

import java.util.HashMap;
import java.util.Map;

import org.junit.Test;

import cn.byapps.attendance.util.SSLHttpClientUtil;

public class Http {

	@Test
	public void testHttp() throws Exception {
		String url = "https://www.sojson.com/open/api/weather/json.shtml?city=%E5%B9%BF%E5%B7%9E";
		String encode = "utf-8";
		System.out.println(SSLHttpClientUtil.get(url, null, encode));
	}
	@Test
	public void json() {
		Map<String,Object> mpas = new HashMap<String,Object>();
		String[] str = {"dkjfg","dddd","22222"};
		Integer[] in = {10,2,100};
		mpas.put("categroy", str);
		mpas.put("data", in);
		//System.out.println(JSON.toJSONString(mpas));
	}
}
